trigger Ownerupdatepo on Purchase_Object__c (before insert, before update) {
 List<Decimal> poid = New List<Decimal>();  
 for (Purchase_Object__c  po : Trigger.New){     
  poid.add(po.Oracle_Acc_Number__c);}
  List<Account> Accounts =[SELECT OwnerID from Account acc where (acc.Oracle_Account_Number__c = :poid)];        
  if(Accounts.Size() > 0) {         
    for(Purchase_Object__c  po : Trigger.New){
      po.OwnerId = Accounts[0].OwnerID;}          
       }            
   }